{include file='imobile_header.tpl'}

<div id="topbar">
  <div id="leftnav"> 
    <a href="user_home.php"><img alt="home" src="./include/imobile/iwebkit/images/home.png" /></a>
    <a href="javascript:history.go(-1);">{lang_print id=11340015}</a>
  </div> 
  <div id="title"> 
    {lang_print id=11340061}
  </div>
  <div id="bluerightbutton"><a href="browse_events.php">{lang_print id=11340062}</a></div>
</div>


<div id="content">

  <div id="profile_overview">
    <img src="{$event->event_photo("./images/nophoto.gif")}" width="90" />
    <div>
      <span class="name">{$event->event_info.event_title}</span>
    </div>
    
  </div>
  <div style="clear: both"></div>
  
  
  {if $event->eventmember_info.eventmember_rsvp > 0}
  <span class="graytitle">{lang_print id=3000278}</span>
  <ul class="pageitem">
    <li class="textbox">
      {if $event->eventmember_info.eventmember_rsvp==1}{lang_print id=3000082}{/if}
      {if $event->eventmember_info.eventmember_rsvp==2}{lang_print id=3000083}{/if}
      {if $event->eventmember_info.eventmember_rsvp==3}{lang_print id=3000084}{/if}
    </li>
  </ul>
  {/if}
  
  <span class="graytitle">{lang_print id=3000175}</span>
  <ul class="pageitem">
    <li class="textbox">
                {assign var=event_date_start value=$datetime->timezone($event->event_info.event_date_start, $global_timezone)}
                {assign var=event_date_end value=$datetime->timezone($event->event_info.event_date_end, $global_timezone)}
                
                {* NO END DATE *}
                {if !$event->event_info.event_date_end}
                  {lang_sprintf id=3000203 1=$datetime->cdate($setting.setting_dateformat, $event_date_start) 2=$datetime->cdate($setting.setting_timeformat, $event_date_start)}
                
                {* SAME-DAY EVENT *}
                {elseif $datetime->cdate("F j, Y", $event_date_start)==$datetime->cdate("F j, Y", $event_date_end)}
                  {lang_sprintf id=3000202 1=$datetime->cdate($setting.setting_dateformat, $event_date_start) 2=$datetime->cdate($setting.setting_timeformat, $event_date_start) 3=$datetime->cdate($setting.setting_timeformat, $event_date_end)}
                
                {* MULTI-DAY EVENT *}
                {else}
                  {lang_sprintf id=3000204 1=$datetime->cdate("`$setting.setting_dateformat` `$setting.setting_timeformat`", $event_date_start) 2=$datetime->cdate("`$setting.setting_dateformat` `$setting.setting_timeformat`", $event_date_end)}
                {/if}
    </li>
  </ul>
  
  {if !empty($event->event_info.event_desc)}
  <span class="graytitle">{lang_print id=3000111}</span>
  <ul class="pageitem">
    <li class="textbox">
      {$event->event_info.event_desc}
    </li>
  </ul>
  {/if}
  
  
  <span class="graytitle">{lang_print id=3000269}</span>
  <ul class="pageitem">
        {section name=officer_loop loop=$officers}
        <li class="textbox">
          <a href='{$url->url_create("profile", $officers[officer_loop].member->user_info.user_username)}'>{$officers[officer_loop].member->user_displayname}</a>{if $officers[officer_loop].eventmember_rank == 3} ({lang_print id=3000270}){/if}
        </li>
        {/section}
  </ul>

    
  
  {if !empty($event->event_info.event_host)}
  <span class="graytitle">{lang_print id=3000115}</span>
  <ul class="pageitem">
    <li class="textbox">
      {$event->event_info.event_host}
    </li>
  </ul>
  {/if}
  
  {if !empty($event->event_info.event_location)}
  <span class="graytitle">{lang_print id=3000116}</span>
  <ul class="pageitem">
    <li class="textbox">
      {$event->event_info.event_location}
    </li>
  </ul>
  {/if}
  
  <span class="graytitle">{lang_print id=3000174}</span>
  <ul class="pageitem">
    <li class="key_value">
      <span class="key">{lang_print id=3000280}</span>
      <span class="value">
                {if $eventcat_info.subcat_dependency == 0}
                  <a href='browse_events.php?eventcat_id={$eventcat_info.subcat_id}&v=1'>{lang_print id=$eventcat_info.subcat_title}</a>
                {else}
                  <a href='browse_events.php?eventcat_id={$eventcat_info.cat_id}&v=1'>{lang_print id=$eventcat_info.cat_title}</a> -
                  <a href='browse_events.php?eventcat_id={$eventcat_info.subcat_id}&v=1'>{lang_print id=$eventcat_info.subcat_title}</a>
                {/if}  
      </span>          
    </li>
  
            {section name=cat_loop loop=$cats}
              {section name=field_loop loop=$cats[cat_loop].fields}
                <li class="key_value">
                  <span class="key">{lang_print id=$cats[cat_loop].fields[field_loop].field_title}:</span>
                  <span class="value">{$cats[cat_loop].fields[field_loop].field_value_formatted}</span>
                </li>
              {/section}
            {/section}
  </ul>            
                   
</div>

{include file='imobile_footer.tpl'}
